//
//  STRightViewController.swift
//  STMusic
//
//  Created by stoneobs on 16/10/18.
//  Copyright © 2016年 stoneobs. All rights reserved.
//  这将会是一个播放界面

import UIKit

class YYRightViewController: UIViewController {

    var topImageView:UIImageView?
    
    var iconButton:STButton?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.init(gradientStyle: .topToBottom, withFrame: self.view.bounds, andColors: [FlatWhiteDark(),FlatWhite()]);
        self.configSubviews();
        // Do any additional setup after loading the view.
    }
    func configSubviews()  {
        self.topImageView = UIImageView.init(frame: .init(x: 0, y: 0, width: SCREEN_WIDTH, height: 250));
        let visEffect = UIBlurEffect.init(style: .extraLight);
        let visoulView = UIVisualEffectView.init(frame: (topImageView?.bounds)!)
        visoulView.effect = visEffect;
        visoulView.alpha = 1;
        topImageView?.addSubview(visoulView);
        self.topImageView?.image = UIImage.init(named: "6");
        
        self.view.addSubview(self.topImageView!);
        
        let whiteView:UIView = UIView.init(frame: .init(x: 0, y: 0, width: 170, height: 170));
        whiteView.layer.cornerRadius = 85;
        whiteView.clipsToBounds = true;
        whiteView.backgroundColor = .white;
        whiteView.centerX = SCREEN_WIDTH/2;
        whiteView.centerY = (topImageView?.bottom)!;
        self.view.addSubview(whiteView);
        
        self.iconButton = STButton.init(frame: .init(x: 0, y: 0, width: 160, height: 160), title: nil, titleColor: nil, titleFont: 0, cornerRadius: 80, backgroundColor: .white, backgroundImage: UIImage.init(named: "6"), image: nil);
        self.iconButton?.centerX = 85;
        self.iconButton?.centerY = 85;
        

        
        whiteView.addSubview(self.iconButton!);
        whiteView.showLeftShadow();
       
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    



}
